package demo1;

public class Test {
    public static void main(String[] args) {
        Student[] allstudents = new Student[10];
        allstudents[0] = new Student("张三", '男', 80);
        allstudents[1] = new Student("李四", '女', 90);
        allstudents[2] = new Student("王五", '男', 70);
        allstudents[3] = new Student("赵六", '女', 60);
        allstudents[4] = new Student("孙七", '男', 50);
        allstudents[5] = new Student("周八", '女', 40);
        allstudents[6] = new Student("吴九", '男', 30);
        allstudents[7] = new Student("郑十", '女', 20);
        allstudents[8] = new Student("王十一", '男', 10);
        allstudents[9] = new Student("赵十二", '女', 100);

        //两套方案，解耦合：面向接口编程
        ClassDatalnter cdi = new ClassDatalnterlmpl1(allstudents);
        cdi.printAllStudentInfos();
        cdi.printAverageScore();
    }
}
